<?php

# PMB Online
# Aplikasi PMB Online untuk Pendaftaran Calon Mahasiswa di PT/PTS Indonesia
# 
# version 1.0
# class biaya_view
# file
# created Feb 6, 2013 4:09:54 PM
# 
# (c)2012, arif.laksito@gmail.com

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
?>

<script>
$(function() {
<?php foreach ($biaya as $s): ?>                
    $("#dialog_<?php echo $s['id_biaya']?>").hide();    
    $("#confirm_<?php echo $s['id_biaya'] ?>").click(function(){
        $("#dialog_<?php echo $s['id_biaya'] ?>").dialog({            
            height:200,
            modal: false,
            buttons: {
                "Delete": function() {
                    window.location = "<?php echo base_url().'apps/biaya_del/'.$s['id_biaya']?>";
                    $( this ).dialog( "close" );
                },
                Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });
    });
<?php endforeach; ?>                                        
});
</script>

<?php foreach ($biaya as $h): ?>
    <div id="dialog_<?php echo $h['id_biaya'] ?>" title="Hapus Biaya PMB?">
        <p style="font-size: 12px">
            <span style="font-size: 24px; float: left; margin: 0 7px 50px 0;"><i class="icon-warning-sign"></i></span>
            Data Biaya "<?php echo $h['nama_gel'].' - '.$h['jenjang'].' '.$h['nama_jurusan']?>" akan dihapus, pastikan tidak ada transaksi pada data tersebut
        </p>
    </div>
<?php endforeach; ?>

<h3>Biaya PMB</h3>
<ul class="breadcrumb">
    <li>PMB Online <span class="divider">/</span></li>  
    <li>Data Master <span class="divider">/</span></li>
    <li>Biaya PMB</li>
</ul>

<?php if ($msg!=''): ?>
    <div class="<?php echo ($sts) ? 'alert alert-success' : 'alert alert-error' ?>">
        <?php echo $msg ?>
    </div>
<?php endif ?>

<p>
    <?php echo anchor('apps/biaya_add', '<i class=icon-plus-sign></i> Tambah Biaya', 'class="btn btn-small btn-success"') ?>
</p>



<table class="table table-condensed table-hover">
    <tr>
        <th>No</th>               
        <th>Gelombang</th>        
        <th>Jurusan</th>        
        <th>Biaya SPA</th>        
        <th>Biaya OKA</th>        
        <th>Beasiswa</th>        
        <th></th>    
    </tr>
    <?php $i=1?>
    <?php foreach($biaya as $b):?>
    <tr>
        <td><?php echo $i?></td>
        <td><?php echo $b['nama_gel']?></td>
        <td><?php echo $b['jenjang'].' '.$b['nama_jurusan']?></td>
        <td>
            <div class="pull-right" style="margin-right: 20px">
            <?php echo number_format($b['spa'])?>
            </div>    
        </td>
        <td>
            <div class="pull-right" style="margin-right: 20px">
            <?php echo number_format($b['oka'])?>
            </div>    
        </td>
        <td>
            <div class="pull-right" style="margin-right: 20px">
            <?php echo number_format($b['beasiswa'])?>
            </div>    
        </td>
        <td>
            <?php echo anchor('apps/biaya_edit/' . $b['id_biaya'], '<i class=icon-edit></i>') ?>&nbsp;&nbsp;&nbsp;
            <a href="#" id="confirm_<?php echo $b['id_biaya'] ?>"><i class="icon-remove"></i></a>
        </td>
    </tr>
    <?php $i++?>
    <?php endforeach?>
</table>    